import useLoginStore from '@/store/login/login'

// 获取是否有对应的增删改查权限
function usePermissions(permissionID: string) {
  const loginStore = useLoginStore()
  const { permissions } = loginStore

  // !! => 转换为布尔值
  return !!permissions.find((item) => item.includes(permissionID))
}

export default usePermissions
